﻿namespace Sgr.EventBus
{
    /// <summary>
    /// 事件总线接口
    /// </summary>
    public interface IEventBus
    {
        /// <summary>
        /// 发布集成事件
        /// </summary>
        /// <param name="event">集成事件</param>
        /// <param name="cancellationToken">取消令牌</param>
        /// <returns></returns>
        Task PublishAsync(IntegrationEvent @event, CancellationToken cancellationToken = default);
    }
}